Communication apparatus having direct wireless communication function and method for controlling communication apparatus

ABSTRACT

A communication apparatus including a direct wireless communication function determines whether the direct wireless communication function is automatically stopped based on a device setting and the type of an SSID to be used.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of U.S. patent applicationSer. No. 15/262,854, filed on Sep. 12, 2016, which claims priority fromJapanese Patent Application No. 2015-184526 filed Sep. 17, 2015, whichis hereby incorporated by reference herein in its entirety.

BACKGROUND Field

Aspects of the present invention generally relate to a communicationapparatus including a direct wireless communication function.

Description of the Related Art

More and more various communication apparatuses, such as personalcomputers (PCs), smartphones, game machines, and printing apparatuses,have been including a wireless local area network (LAN) function. Thesecommunication apparatuses wirelessly connect to an external access pointand perform wireless communication with other devices via the accesspoint. For example, a printing apparatus receives print data transmittedby a PC or a smartphone via an access point, and then performs printprocessing based on the received print data.

Some of the communication apparatuses themselves operate as a softwareaccess point, thereby performing direct wireless communication withother devices without a relay apparatus such as an access point. Awireless communication method of performing direct wirelesscommunication with other devices without a relay apparatus such as anaccess point is referred to as a direct wireless communication mode.Specific examples of the direct wireless communication mode includeWi-Fi Direct® and an access point mode.

Japanese Patent Application Laid-Open No. 2014-179926 discusses aconfiguration in which a printing apparatus operates in a directwireless communication mode (Wi-Fi Direct®), and receives print datafrom a mobile terminal to perform print processing. Japanese PatentApplication Laid-Open No. 2014-179926 also discusses a configuration inwhich the printing apparatus ends the operation of the communicationapparatus in the direct wireless communication mode when the printprocessing completes and when the printing apparatus shifts to a powersaving state.

If a user wants the communication apparatus to use the direct wirelesscommunication mode, the user inputs an instruction to the communicationapparatus to start operating in the direct wireless communication mode.The communication apparatus starts operating in the direct wirelesscommunication mode in response to the instruction and establishes awireless connection with other devices.

Conventional communication apparatuses automatically stop operating inthe direct wireless communication mode when wireless connections are notestablished between the communication apparatuses and other devices fora predetermined period of time after the communication apparatuses startto operate in the direct wireless communication mode. In this way, theconventional communication apparatuses prevent an increase in powerconsumption when the communication apparatuses operate in the directwireless communication mode.

SUMMARY

According to an aspect of the present invention, a communicationapparatus including a direct wireless communication function includes asetting unit configured to set a first setting for automaticallystopping the direct wireless communication function or a second settingfor not automatically stopping the direct wireless communicationfunction, and a control unit configured to, in a case where the settingunit sets the first setting, stop the direct wireless communicationfunction on a condition that a predetermined period of time has elapsedwhile a wireless connection using the direct wireless communicationfunction is not established and, in a case where the setting unit setsthe second setting, not stop the direct wireless communication functioneven if the predetermined period of time has elapsed while the wirelessconnection is not established.

Further features of aspects of the present invention will becomeapparent from the following description of exemplary embodiments withreference to the attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating a hardware configuration of aprinting apparatus.

FIGS. 2A, 2B, and 2C are diagrams illustrating a procedure for using anaccess point mode.

FIG. 3 is a diagram illustrating a setting screen relating to the accesspoint mode.

FIG. 4 is a flowchart illustrating processing relating to an operationin the access point mode.

FIG. 5 is a flowchart illustrating the processing relating to theoperation in the access point mode.

FIG. 6 is a diagram illustrating a setting screen relating to the accesspoint mode.

FIG. 7 is a flowchart illustrating processing relating to an operationin the access point mode.

FIG. 8 is a flowchart illustrating the processing relating to theoperation in the access point mode.

DESCRIPTION OF THE EMBODIMENTS

Exemplary embodiments of the present invention will be described belowwith reference to the drawings. The following exemplary embodiments arenot intended to limit the aspects of the invention according to thescope of claims, and all combinations of features described in theexemplary embodiments are not necessarily essential to implement theaspects of the invention.

A first exemplary embodiment will be described below. First, an entireimage of a communication system and a hardware configuration of aprinting apparatus 100 will be described with reference to FIG. 1. Theprinting apparatus 100 is connected to a network 110. The printingapparatus 100 receives print data from an external apparatus, such as aPC on the network 110, and performs print processing based on thereceived print data.

The printing apparatus 100 performs wireless communication with aportable terminal 120. The printing apparatus 100 can perform twosystems of wireless communication. The first system is a system for theprinting apparatus 100 to perform wireless communication with theportable terminal 120 via an external access point by being connected tothe external access point. This system is referred to as aninfrastructure mode. The second system is a system for the printingapparatus 100 to perform direct wireless communication with the portableterminal 120 without a relay apparatus, such as an access point, byoperating as a software access point. The system for the printingapparatus 100 and the portable terminal 120 to perform direct wirelesscommunication without a relay apparatus is referred to as a directwireless communication mode. The printing apparatus 100 operates ineither the infrastructure mode or the direct wireless communication modeto receive print data from the portable terminal 120 using wirelesscommunication. The printing apparatus 100 performs print processingbased on the received print data.

The hardware configuration of the printing apparatus 100 will bedescribed below. The printing apparatus 100 is an example of acommunication apparatus that performs wireless communication in theinfrastructure mode or the direct wireless communication mode. Otherdevices that can perform wireless communication in the infrastructure ordirect wireless communication modes can be applied to the presentexemplary embodiment.

The CPU 101 performs various types of processing for reading out acontrol program stored in the ROM 102 to control an operation of theprinting apparatus 100. A read-only memory (ROM) 102 stores the controlprogram. A random access memory (RAM) 103 is used as a temporary storagearea, such as a main memory or a work area in the CPU 101. A hard diskdrive (HDD) 104 is a nonvolatile storage medium storing various types ofdata.

In the present exemplary embodiment, the CPU 101 performs each of theprocesses illustrated in the flowcharts described below, in the printingapparatus 100. In another exemplary embodiment, a plurality of CPUsperforms each of the processes illustrated in the flowcharts incooperation with one another. Some of the processes in the flowcharts,described below, can also be performed using a hardware circuit, such asan Application Specific Integrated Circuit (ASIC).

A wireless LAN interface (I/F) 105 performs wireless communication basedon Wi-Fi® with the external apparatus (e.g., the portable terminal 120).The wireless LAN I/F 105 is operable in the infrastructure mode for theprinting apparatus 100 to perform wireless communication with theexternal apparatus by being connected to the external access point. Itis operable in the direct wireless communication mode for the printingapparatus 100 to perform direct wireless communication with the externalapparatus without the relay apparatus, such as the access point. In thepresent exemplary embodiment, as a specific example of the directwireless communication mode, the printing apparatus 100 operates in theaccess point mode. However, the direct wireless communication mode ofthe present exemplary embodiment is not limited to the access pointmode. Wi-Fi Direct® is also applicable as the direct wirelesscommunication mode.

A network I/F 109 is connected to the network 110 via a LAN cable. Thenetwork I/F 109 is communicable with the external apparatus (e.g., thePC) on the network 110.

A printer 106 performs print processing on a sheet based on print datareceived by the wireless LAN I/F 105 or the network I/F 109. A scanner107 reads a document to generate a document image. The document image,which has been generated by the scanner 107, is printed by the printer106 (i.e., copy processing), and is stored in the HDD 104.

An operation unit 108 includes a liquid crystal display unit including atouch panel function and a keyboard, and displays various types ofoperation screens. A user can input instructions and information to theprinting apparatus 100 via the operation unit 108.

A procedure for an operation performed when the user uses the accesspoint mode will be described below with reference to FIG. 2. If the useruses the access point mode, the user instructs the printing apparatus100 to start an operation in the access point mode.

A menu screen 200 illustrated in FIG. 2A is a screen displayed by theoperation unit 108, and is an initial screen displayed when the printingapparatus 100 is started. In the case where user authentication isneeded to access the printing apparatus 100, the initial screen istypically displayed after successful user authentication. Functions ofthe printing apparatus 100, which are usable by the user, are displayedon the menu screen 200, and the user can select and use the desiredfunction.

A button 201 is a button for the user to use a copy function. When theuser touches the button 201, the operation unit 108 displays a copyscreen (not illustrated).

A button 202 is a button for the user to use a SEND function, whichtransmits a document image generated by the scanner 107 to the externalapparatus. When the user touches the button 202, the operation unit 108displays a SEND screen (not illustrated).

A button 204 is a button for performing a device setting of the printingapparatus 100. When the user touches the button 204, the operation unit108 displays various types of setting screens. A setting screen 300illustrated in FIG. 3, described below, is also included in the varioustypes of setting screens.

A button 203 is a button for the user to use the access point mode. Whenthe user touches the button 203, the operation unit 108 displays awireless connection screen 210 illustrated in FIG. 2B.

A start button 211 is displayed on the wireless connection screen 210.The start button 211 is a button for the user to instruct the printingapparatus 100 to start the operation in the access point mode. When theuser touches the start button 211, the printing apparatus 100 starts theoperation in the access point mode, and the operation unit 108 displaysa wireless connection screen 220 illustrated in FIG. 2C.

When the printing apparatus 100 operates in the access point mode, theprinting apparatus 100 creates a Service Set Identifier (SSID), andfunctions as a software access point. A connection key, e.g., a WiredEquivalent Privacy (WEP) key and the SSID created by the printingapparatus 100 are displayed in an area 221 in the wireless connectionscreen 220. The SSID includes two types of SSIDs, i.e., a fixed SSID anda one-time SSID. The user, who has confirmed content displayed in thearea 221, uses the user's own portable terminal (e.g., the portableterminal 120) to search for an access point in proximity to the user'slocation, and selects the SSID displayed in the area 221 from a list ofsearch results. When the user inputs the connection key displayed in thearea 221 into the portable terminal 120, wireless communication isestablished between the printing apparatus 100 and the user's portableterminal.

A stop button 222 is displayed on the wireless connection screen 220.When the user wants to stop the printing apparatus 100 from operating inthe access point mode, the user touches the stop button 222. While theprinting apparatus 100 is operating in the access point mode, the powerconsumption of the printing apparatus 100 increases. Thus, the user isable to conserve power consumption by touching the stop button 222 whenthe need to use the access point mode ends.

A procedure for the operation performed when the user uses the accesspoint mode has been described above with reference to FIG. 2. When theuser touches the start button 211, the printing apparatus 100 starts theoperation in the access point mode by entering a standby state where itwaits for a wireless connection request to be issued from the externalapparatus. The wireless connection request is not necessarilyimmediately issued from the external apparatus after the printingapparatus 100 starts the operation in the access point mode. Therefore,the operation in the access point mode can stop if a predeterminedperiod of time has elapsed without receipt of a wireless connectionrequest since the operation in the access point mode was started. Thus,power consumption can be prevented from uselessly increasing in theprinting apparatus 100.

The operation in the access point mode may not be automatically stoppeddepending on the access point mode and use of the printing apparatus100. For example, if multiple users use the direct wirelesscommunication mode, like in an office environment, the operation in thedirect wireless communication mode is typically continued. In thepresent exemplary embodiment, determination whether the operation in theaccess point mode is automatically stopped when the wireless connectionrequest has not been received within a predetermined time period isswitched by the device setting of the printing apparatus 100.

A method for switching whether the operation in the access point mode isautomatically stopped will now be described. A setting screen 300illustrated in FIG. 3 is a screen for the user to make a settingrelating to the access point mode, and is displayed by the operationunit 108. In the setting screen 300, the user can set which of the fixedSSID and the one-time SSID is used as the SSID and whether the operationin the access point mode is automatically stopped.

In an item 301, the user selects either the fixed SSID or the one-timeSSID to use as the SSID. The setting screen 300 reflects a case wherethe user selected the fixed SSID. The fixed SSID is an SSID that theuser has input into an input area 302. If the fixed SSID is used as theSSID, the SSID used in the access point mode becomes an SSID that is thesame every time, i.e., the SSID that the user has input into the inputarea 302. A fixed SSID is useful in a situation where many and/orunspecified persons use the access point mode in an infrastructureconnection environment.

The one-time SSID is an SSID that is randomly created. If the one-timeSSID is used as the SSID, a random SSID is created every time theoperation in the access point mode is started. The one-time SSID isselected for situations where the access point mode is used temporarily.

In an item 303, the user selects whether the operation in the accesspoint mode is automatically stopped. The setting screen 300 indicates acase where the user has selected “automatic stop”. When the “automaticstop” is selected, the printing apparatus 100 automatically stops theoperation in the access point mode on the condition that a wirelessconnection has not been established for a predetermined period of timesince the operation in the access point mode was started. “Predeterminedperiod of time” is a period of time that the user has input into theinput area 304. “Predetermined period of time=0” means that theoperation in the access point mode is not performed. Therefore, alower-limit value of a period of time, which is settable as the“predetermined period of time”, e.g., “one minute or more” is typicallyset. When “not automatic stop” is selected in the item 303, the printingapparatus 100 does not stop the operation in the access point mode evenif the wireless connection has not been established since the operationin the access point mode was started. The item 303 enables the user toset whether the operation in the access point mode is automaticallystopped in consideration of the access point mode and how to use of theprinting apparatus 100.

The user, who has made desired settings in the items 301 and 303,touches a registration button 305. When the user touches theregistration button 305, the printing apparatus 100 stores a settingresult by the setting screen 300 as a device setting in the HDD 104.

Processing for starting the operation in the access point mode andprocessing for automatically stopping the operation in the access pointmode will be described below with reference to flowcharts in FIGS. 4 and5. Each of steps illustrated in the flowcharts of FIGS. 4 and 5 isprocessed by the CPU 101 loading a control program stored in the memory,such as the ROM 102, and executing the loaded control program.

When the user touches the start button 211 on the wireless connectionscreen 210, the processing illustrated in the flowchart of FIG. 4 isperformed. First, in step S401, the CPU 101 starts the operation in theaccess point mode. More specifically, the CPU 101 instructs the wirelessLAN I/F 105 to start the operation in the access point mode. The CPU 101starts a timer at when the operation in the access point mode starts.

In step S402, the CPU 101 confirms whether the SSID is set to theone-time SSID. The process in step S402 is performed by confirming thedevice setting stored in the HDD 104, i.e., the result of the settingmade via the setting screen 300. If the SSID is set to the one-time SSID(YES in step S402), the processing proceeds to step S403. If the SSID isset to the fixed SSID (NO in step S402), the processing proceeds to stepS405.

Next, in step S403, the CPU 101 randomly creates the one-time SSID. Instep S404, the CPU 101 then displays the created one-time SSID. Morespecifically, the CPU 101 controls the operation unit 108 to display awireless connection screen indicating the created SSID (e.g., thewireless connection screen 220), and the operation unit 108 displays thewireless connection screen.

In step S405, the CPU 101 displays the fixed SSID. More specifically,the CPU 101 controls the operation unit 108 to display a wirelessconnection screen indicating the fixed SSID (e.g., the wirelessconnection screen 220), and the operation unit 108 displays the wirelessconnection screen. The fixed SSID is an SSID input by the user into theinput area 302 in the setting screen 300.

Next, in step S406, the CPU 101 determines whether the device setting ofthe printing apparatus 100 is a setting for automatically stopping theoperation in the access point mode, i.e., whether “automatic stop” isset. The process in step S406 is performed by confirming the devicesetting stored in the HDD 104, i.e., the result of the setting made viathe setting screen 300. If the “automatic stop” is set in the settingscreen 300 (YES in step S406), the processing proceeds to step S407. Ifthe “not automatic stop” is set in the setting screen 300 (NO in stepS406), the processing proceeds to step S501 illustrated in FIG. 5.

In step S407, the CPU 101 determines whether the wireless connectionusing the access point mode has been established between the externalapparatus and the printing apparatus 100. If the wireless connectionusing the access point mode has been established between the externalapparatus and the printing apparatus 100 (YES in step S407), theprocessing proceeds to step S411. If the wireless connection using theaccess point mode has not been established between the externalapparatus and the printing apparatus 100 (NO in step S407), theprocessing proceeds to step S408.

In step S408, the CPU 101 determines whether the stop button 222 forissuing the instruction to stop the operation in the access point modehas been pressed. If the user has touched the stop button 222 on thewireless connection screen 220, the CPU 101 determines that the stopbutton 222 has been pressed (YES in step S408), and the processingproceeds to step S410. If the user has not touched the stop button 222,the CPU 101 determines that the stop button 222 has not been pressed (NOin step S408), and the processing proceeds to step S409.

Next, in step S409, the CPU 101 determines whether a predeterminedperiod of time has elapsed since the operation in the access point modewas started. As described above, in the present exemplary embodiment,the CPU 101 starts the timer when the operation in the access point modestarts in step S401. The “predetermined period of time” herein describedis a period of time input by the user into the input area 304 in thesetting screen 300. If the predetermined period of time has elapsedwhile the wireless connection using the access point mode is notestablished since the operation in the access point mode was started(YES in step S409), the processing proceeds to step S410. If thepredetermined period of time has not elapsed (NO in step S409), theprocessing returns to step S407.

In step S410, the CPU 101 stops the operation in the access point mode.More specifically, the CPU 101 instructs the wireless LAN I/F 105 tostop the operation in the access point mode.

In step S411, the CPU 101 determines whether the wireless connectionusing the access point mode has been interrupted. If the wirelessconnection using the access point mode has been interrupted (YES in stepS411), the processing proceeds to step S410. In step S410, the CPU 101stops the operation in the access point mode. If the wireless connectionusing the access point mode has not been interrupted (NO in step S411),the processing proceeds to step S412. In another exemplary embodiment, aplurality of wireless connections using the access point mode can beestablished in parallel. If the plurality of wireless connections isestablished in parallel, when all of the plurality of wirelessconnections has been interrupted, it is determined that the plurality ofwireless connections using the access point mode has been interrupted(YES in step S411).

In step S412, the CPU 101 determines whether the stop button 222 forissuing the instruction to stop the operation in the access point modehas been pressed. If the user has touched the stop button 222 on thewireless connection screen 220, the CPU 101 determines that the stopbutton 222 has been pressed (YES in step S412), and the processingproceeds to step S410. In step S410, the CPU 101 stops the operation inthe access point mode. If the user has not touched the stop button 222,the CPU 101 determines that the stop button 222 has not been pressed (NOin step S412), and the processing returns to step S411.

Next, processing performed when the “not automatic stop” is set in thesetting screen 300 (NO in step S406), i.e., the printing apparatus 100is set not to automatically stop the operation in the access point modewill be described with reference to FIG. 5. In step S501, the CPU 101determines whether the wireless connection using the access point modehas been established between the external apparatus and the printingapparatus 100. If the wireless connection using the access point modehas been established between the external apparatus and the printingapparatus 100 (YES in step S501), the processing proceeds to step S504.If the wireless connection using the access point mode has not beenestablished between the external apparatus and the printing apparatus100 (NO in step S501), the processing proceeds to step S502.

In step S502, the CPU 101 determines whether the stop button 222 forissuing the instruction to stop the operation in the access point modehas been pressed. If the user has touched the stop button 222 on thewireless connection screen 220, the CPU 101 determines that the stopbutton 222 has been pressed (YES in step S502), and the processingproceeds to step S503. If the user has not touched the stop button 222,the CPU 101 determines that the stop button 222 has not been pressed (NOin step S502), and the processing returns to step S501.

In step S503, the CPU 101 stops the operation in the access point mode.More specifically, the CPU 101 instructs the wireless LAN I/F 105 tostop the operation in the access point mode.

Next, in step S504, the CPU 101 determines whether the wirelessconnection using the access point mode has been interrupted. If thewireless connection using the access point mode has been interrupted(YES in step S504), the processing returns to step S501. If the wirelessconnection using the access point mode has not been interrupted (NO instep S504), the processing proceeds to step S505. In another exemplaryembodiment, a plurality of wireless connections using the access pointmode can be established in parallel. If the plurality of wirelessconnections is established in parallel, when all of the plurality ofwireless connections have been interrupted, it is determined that theplurality of wireless connections using the access point mode have beeninterrupted (YES in step S504). If the printing apparatus 100 is set notto automatically stop the operation in the access point mode, even ifthe wireless connection using the access point mode is interrupted, theoperation in the access point mode is not automatically stopped.

In step S505, the CPU 101 determines whether the stop button 222 forissuing the instruction to stop the operation in the access point modehas been pressed. If the user has touched the stop button 222 on thewireless connection screen 220, the CPU 101 determines that the stopbutton 222 has been pressed (YES in step S505), and the processingproceeds to step S503. In step S503, the CPU 101 stops the operation inthe access point mode. If the user has not touched the stop button 222,the CPU 101 determines that the stop button 222 has not been pressed (NOin step S505), and the processing returns to step S504.

As described above, in the present exemplary embodiment, if the wirelessconnection using the access point mode has not been established sincethe operation in the access point mode was started, it is determinedwhether the operation in the access point mode is automatically stoppedbased on the device setting.

If the “automatic stop” is set as the device setting, the printingapparatus 100 automatically stops the operation in the access point modeon the condition that the wireless connection has not been establishedfor a predetermined period of time since the operation in the accesspoint mode was started. Thus, when the printing apparatus 100 continuesto perform the operation in the access point mode regardless of whetherthe wireless connection has not been established, unnecessary increasein power consumption can be prevented.

If the “not automatic stop” is set as the device setting, the printingapparatus 100 does not automatically stop the operation in the accesspoint mode even if the wireless connection has not been established fora predetermined period of time since the operation in the access pointmode was started. If the wireless connection is expected to beestablished some time since the operation in the access point mode wasstarted, when the printing apparatus 100 continues to perform theoperation in the access point mode, time and labor required by the usercan be reduced.

The printing apparatus 100 stops the operation in the access point modewhen it receives a stop instruction from the user (when the stop button222 has been pressed) regardless of whether the device setting is the“automatic stop” or the “not automatic stop”.

A second exemplary embodiment will now be described. The first exemplaryembodiment described a configuration where whether to automatically stopthe operation in the access point mode is switched is based on thedevice setting. The present exemplary embodiment will describe aconfiguration where whether to automatically stop an operation in anaccess point mode is switched based on the type of an SSID. A hardwareconfiguration of a printing apparatus 100 according to the presentexemplary embodiment is similar to that in the first exemplaryembodiment, and thus a detailed description will be omitted.

A setting screen 600 illustrated in FIG. 6 is a screen for a user tomake a setting relating to an access point mode, and is displayed by anoperation unit 108.

In an item 601, a user selects which of a fixed SSID and a one-time SSIDis used as the SSID. The setting screen 600 indicates a case where theuser has selected the fixed SSID. The fixed SSID is an SSID input by theuser into an input area 602. If the fixed SSID is used as the SSID, theSSID used in the access point mode becomes the same SSID every time. Ifthe one-time SSID is used as the SSID, a random SSID is created everytime an operation in the access point mode is started. When the usertouches a registration button 603, the printing apparatus 100 stores asetting result by the setting screen 600 as a device setting in a HDD104.

In the present exemplary embodiment, whether to automatically stop theoperation in the access point mode is switched based on the type of theSSID. More specifically, if the one-time SSID is used, the operation inthe access point mode is automatically stopped. The one-time SSID isassumed to be used for the purpose of temporarily using the access pointmode and the printing apparatus 100.

If the fixed SSID is used, the operation in the access point mode is notautomatically stopped. The fixed SSID is assumed to be used more for thepurpose of using the access point mode in an infrastructure connectionby many and/or unspecified persons, like in an office environment. Thistype of environment lends itself more to the operation in the accesspoint not automatically stopping, but continuing.

Processing for starting the operation in the access point mode andprocessing for automatically stopping the operation in the access pointmode will be described below with reference to the flowcharts in FIGS. 7and 8. Each of steps illustrated in the flowcharts of FIGS. 7 and 8 isprocessed by a CPU 101 loading a control program stored in a memory suchas a ROM 102 into a RAM 103 and executing the loaded control program.

When the user touches a start button 211 on a wireless connection screen210, the processing illustrated in the flowchart of FIG. 7 is performed.First, in step S701, the CPU 101 starts the operation in the accesspoint mode. More specifically, the CPU 101 instructs a wireless LAN I/F105 to start the operation in the access point mode. The CPU 101 startsa timer when the operation in the access point mode starts.

In step S702, the CPU 101 confirms whether the SSID is set to theone-time SSID. The process in step S702 is performed by confirming thedevice setting stored in the HDD 104, i.e., the result of the settingmade via the setting screen 600. If the SSID is set to the one-time SSID(YES in step S702), the processing proceeds to step S703. If the SSID isset to the fixed SSID (NO in step S702), the processing proceeds to stepS801 illustrated in FIG. 8.

Next, in step S703, the CPU 101 randomly creates the one-time SSID. Instep S704, the CPU 101 displays the created one-time SSID. Morespecifically, the CPU 101 controls the operation unit 108 to display awireless connection screen indicating the created SSID (e.g., a wirelessconnection screen 220), and the operation unit 108 displays the wirelessconnection screen.

In step S705, the CPU 101 determines whether the wireless connectionusing the access point mode has been established between an externalapparatus and the printing apparatus 100. If the wireless connectionusing the access point mode has been established between the externalapparatus and the printing apparatus 100 (YES in step S705), theprocessing proceeds to step S709. If the wireless connection using theaccess point mode has not been established between the externalapparatus and the printing apparatus 100 (NO in step S705), theprocessing proceeds to step S706.

In step S706, the CPU 101 determines whether a stop button 222 forissuing an instruction to stop the operation in the access point modehas been pressed. If the user has touched the stop button 222 on thewireless connection screen 220, the CPU 101 determines that the stopbutton 222 has been pressed (YES in step S706), and the processingproceeds to step S708. If the user has not touched the stop button 222,the CPU 101 determines that the stop button 222 has not been pressed (NOin step S706), and the processing proceeds to step S707.

In step S707, the CPU 101 determines whether a predetermined period oftime has elapsed since the operation in the access point mode wasstarted. As described above, in the present exemplary embodiment, theCPU 101 starts the timer when the operation in the access point modestarts in step S701. The “predetermined period of time” herein describedis assumed to be a period of time (e.g., five minutes) previously set inthe printing apparatus 100. This period of time is changeable by theuser. If the predetermined period of time has elapsed while the wirelessconnection using the access point mode is not established since theoperation in the access point mode was started (YES in step S707), theprocessing proceeds to step S708. If the predetermined period of timehas not elapsed (NO in step S707), the processing returns to step S705.

In step S708, the CPU 101 stops the operation in the access point mode.More specifically, the CPU 101 instructs the wireless LAN I/F 105 tostop the operation in the access point mode.

Next, in step S709, the CPU 101 determines whether the wirelessconnection using the access point mode has been interrupted. If thewireless connection using the access point mode has been interrupted(YES in step S709), the processing proceeds to step S708. In step S708,the operation in the access point mode is stopped. If the wirelessconnection using the access point mode has not been interrupted (NO instep S709), the processing proceeds to step S710. In another exemplaryembodiment, a plurality of wireless connections using the access pointmode can be established in parallel. If the plurality of wirelessconnections is established in parallel, when all of the plurality ofwireless connections has been interrupted, it is determined that theplurality of wireless connections using the access point mode has beeninterrupted (YES in step S709).

In step S710, the CPU 101 determines whether the stop button 222 forissuing the instruction to stop the operation in the access point modehas been pressed. If the user has touched the stop button 222 on thewireless connection screen 220, the CPU 101 determines that the stopbutton 222 has been pressed (YES in step S710), and the processingproceeds to step S708. In step S708, the CPU 101 stops the operation inthe access point mode. If the user has not touched the stop button 222,the CPU 101 determines that the stop button 222 has not been pressed (NOin step S710), and the processing returns to step S709.

Next, processing performed when the SSID to be used is set to the fixedSSID will be described with reference to FIG. 8. In step S801, the CPU101 displays the fixed SSID. More specifically, the CPU 101 controls theoperation unit 108 to display a wireless connection screen indicatingthe fixed SSID (e.g., the wireless connection screen 220), and theoperation unit 108 displays the wireless connection screen. The fixedSSID is an SSID input by the user into the input area 602 in the settingscreen 600.

In step S802, the CPU 101 determines whether the wireless connectionusing the access point mode has been established between the externalapparatus and the printing apparatus 100. If the wireless connectionusing the access point mode has been established between the externalapparatus and the printing apparatus 100 (YES in step S802), theprocessing proceeds to step S805. If the wireless connection using theaccess point mode has not been established between the externalapparatus and the printing apparatus 100 (NO in step S802), theprocessing proceeds to step S803.

In step S803, the CPU 101 determines whether the stop button 222 forissuing the instruction to stop the operation in the access point modehas been pressed. If the user has touched the stop button 222 on thewireless connection screen 220, the CPU 101 determines that the stopbutton 222 has been pressed (YES in step S803), and the processingproceeds to step S804. If the user has not touched the stop button 222,the CPU 101 determines that the stop button 222 has not been pressed (Noin step S803), and the processing returns to step S802.

In step S804, the CPU 101 stops the operation in the access point mode.More specifically, the CPU 101 instructs the wireless LAN I/F 105 tostop the operation in the access point mode.

In step S805, the CPU 101 determines whether the wireless connectionusing the access point mode has been interrupted. If the wirelessconnection using the access point mode has been interrupted (YES in stepS805), the processing returns to step S802. If the wireless connectionusing the access point mode has not been interrupted (NO in step S805),the processing proceeds to step S806. In another exemplary embodiment, aplurality of wireless connections using the access point mode can beestablished in parallel. If the plurality of wireless connections isestablished in parallel, when all of the plurality of wirelessconnections has been interrupted, it is determined that the plurality ofwireless connections using the access point mode has been interrupted(YES in step S805). Further, when the SSID to be used is set to thefixed SSID, even if the wireless connection using the access point modeis interrupted, the operation in the access point mode is notautomatically stopped.

In step S806, the CPU 101 determines whether the stop button 222 forissuing the instruction to stop the operation in the access point modehas been pressed. If the user has touched the stop button 222 on thewireless connection screen 220, the CPU 101 determines that the stopbutton 222 has been pressed (YES in step S806), and the processingproceeds to step S804. In step S804, the CPU 101 stops the operation inthe access point mode. If the user has not touched the stop button 222,the CPU 101 determines that the stop button 222 has not been pressed (NOin step S806), and the processing returns to step S805.

As described above, in the present exemplary embodiment, if the wirelessconnection using the access point mode has not been established sincethe operation in the access point mode was started, it is determinedwhether the operation in the access point mode is automatically stoppedbased on the type of the SSID.

If the SSID to be used in the access point mode is the one-time SSID,the printing apparatus 100 automatically stops the operation in theaccess point mode on the condition that the wireless connection has notbeen established for a predetermined period of time since the operationin the access point mode was started. The one-time SSID is assumed to beused for the purpose of temporarily using the access point mode and theprinting apparatus 100.

If the SSID to be used in the access point mode is the fixed SSID, theprinting apparatus 100 does not automatically stop the operation in theaccess point mode even if the wireless connection has not beenestablished for a predetermined period of time since the operation inthe access point mode was started. The fixed SSID is assumed to be usedfor the purpose of using the access point mode in an infrastructureconnection by many and/or unspecified persons, like in an officeenvironment. This type of environment lends itself more to the operationin the access point mode not automatically stopping, but continuing.

The printing apparatus 100 stops the operation in the access point modewhen it receives a stop instruction from the user (when the stop button220 has been pressed) regardless of whether the SSID to be used in theaccess point mode is the one-time SSID or the fixed SSID.

OTHER EMBODIMENTS

Embodiment(s) of the present invention can also be realized by acomputer of a system or apparatus that reads out and executes computerexecutable instructions (e.g., one or more programs) recorded on astorage medium (which may also be referred to more fully as a‘non-transitory computer-readable storage medium’) to perform thefunctions of one or more of the above-described embodiment(s) and/orthat includes one or more circuits (e.g., application specificintegrated circuit (ASIC)) for performing the functions of one or moreof the above-described embodiment(s), and by a method performed by thecomputer of the system or apparatus by, for example, reading out andexecuting the computer executable instructions from the storage mediumto perform the functions of one or more of the above-describedembodiment(s) and/or controlling the one or more circuits to perform thefunctions of one or more of the above-described embodiment(s). Thecomputer may comprise one or more processors (e.g., central processingunit (CPU), micro processing unit (MPU)) and may include a network ofseparate computers or separate processors to read out and execute thecomputer executable instructions. The computer executable instructionsmay be provided to the computer, for example, from a network or thestorage medium. The storage medium may include, for example, one or moreof a hard disk, a random-access memory (RAM), a read only memory (ROM),a storage of distributed computing systems, an optical disk (such as acompact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™),a flash memory device, a memory card, and the like.

While aspects of the present invention have been described withreference to exemplary embodiments, it is to be understood that theaspects of the invention are not limited to the disclosed exemplaryembodiments. The scope of the following claims is to be accorded thebroadest interpretation so as to encompass all such modifications andequivalent structures and functions.

What is claimed is:
 1. A method for controlling a printing apparatuscapable of establishing a direct wireless connection with acommunication terminal, not through an intermediary of a relayapparatus, by operating as an access point conforming to an IEEE802.11standard, comprising: starting an operation as the access point;stopping the operation as the access point in a case where a one-timeSSID is used, on a condition that the direct wireless connection withthe communication terminal is not established for a predetermined timeperiod, and; continuing the operation as the access point in a casewhere a fixed SSID is used, even if the direct wireless connection withthe communication terminal is not established for the predetermined timeperiod.
 2. The method according to claim 1, wherein the operation as theaccess point is started on a condition that an instruction to start thedirect wireless connection is received from a user.
 3. The methodaccording to claim 2, wherein the operation as the access point isstopped on a condition that an instruction to stop the direct wirelessconnection is received from the user, in either case where the one-timeSSID is used or where the fixed SSID is used.
 4. The method according toclaim 1, wherein the operation as the access point is stopped in a casewhere the one-time SSID is used, on a condition that an establisheddirect wireless connection is disconnected, and wherein the operation asthe access point is continued in a case where the fixed SSID is used,even if the established direct wireless connection is disconnected. 5.The method according to claim 1, wherein the operation as the accesspoint is stopped in a case where the one-time SSID is used, on acondition that all of a plurality of established direct wirelessconnections are disconnected, and wherein the operation as the accesspoint is continued in a case where the fixed SSID is used, even if theall of the plurality of established direct wireless connections aredisconnected.
 6. The method according to claim 1, further comprising:storing setting as to whether to use the one-time SSID or to use thefixed SSID; and operating as the access point in accordance with thestored setting.
 7. The method according to claim 6, further comprising:displaying the one-time SSID or the fixed SSID in accordance with thestored setting.
 8. The method according to claim 7, further comprising:displaying an encryption key together with the one-time SSID or thefixed SSID.
 9. The method according to claim 1, further comprising:generating the one-time SSID.
 10. A printing apparatus capable ofestablishing a direct wireless connection with a communication terminal,not through an intermediary of a relay apparatus, by operating as anaccess point conforming to an IEEE802.11 standard, comprising: a memorystoring instructions; and at least one processor that executes theinstructions to cause the printing apparatus to: start an operation asthe access point; stop the operation as the access point in a case wherea one-time SSID is used, on a condition that the direct wirelessconnection with the communication terminal is not established for apredetermined time period, and; continue the operation as the accesspoint in a case where a fixed SSID is used, even if the direct wirelessconnection with the communication terminal is not established for thepredetermined time period.
 11. The printing apparatus according to claim10, wherein the operation as the access point is started on a conditionthat an instruction to start the direct wireless connection is receivedfrom a user.
 12. The printing apparatus according to claim 11, whereinthe operation as the access point is stopped on a condition that aninstruction to stop the direct wireless connection is received from theuser, in either case where the one-time SSID is used or where the fixedSSID is used.
 13. The printing apparatus according to claim 10, whereinthe operation as the access point is stopped in a case where theone-time SSID is used, on a condition that an established directwireless connection is disconnected, and wherein the operation as theaccess point is continued in a case where the fixed SSID is used, evenif the established direct wireless connection is disconnected.
 14. Theprinting apparatus according to claim 10, wherein the operation as theaccess point is stopped in a case where the one-time SSID is used, on acondition that all of a plurality of established direct wirelessconnections are disconnected, and wherein the operation as the accesspoint is continued in a case where the fixed SSID is used, even if theall of the plurality of established direct wireless connections aredisconnected.
 15. The printing apparatus according to claim 10, whereinexecution of the instructions by the at least on processor furthercauses the printing apparatus to: store a setting as to whether to usethe one-time SSID or to use the fixed SSID; and operate as the accesspoint in accordance with the stored setting.
 16. The printing apparatusaccording to claim 15, wherein execution of the instructions by the atleast on processor further causes the printing apparatus to: causedisplay of the one-time SSID or the fixed SSID in accordance with thestored setting.
 17. The printing apparatus according to claim 16,execution of the instructions by the at least on processor furthercauses the printing apparatus to: cause display of an encryption keytogether with the one-time SSID or the fixed SSID.
 18. The printingapparatus according to claim 10, execution of the instructions by the atleast on processor further causes the printing apparatus to: generatethe one-time SSID.
 19. A non-transitory computer readable storage mediumstoring instructions that, when executed by at least one processor,executions a method for controlling a printing apparatus capable ofestablishing a direct wireless connection with a communication terminal,not through an intermediary of a relay apparatus, by operating as anaccess point conforming to an IEEE802.11 standard, the methodcomprising: starting an operation as the access point; stopping theoperation as the access point in a case where a one-time SSID is used,on a condition that the direct wireless connection with thecommunication terminal is not established for a predetermined timeperiod, and; continuing the operation as the access point in a casewhere a fixed SSID is used, even if the direct wireless connection withthe communication terminal is not established for the predetermined timeperiod.